package com.gst.handfood.model;

import android.content.Context;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * Created by YBH on 2017/10/30.
 * 数据模型全局类
 */

public class Model {
    //全局线程池
    private ExecutorService executorService = Executors.newCachedThreadPool();


    public static Model model = null;
    private Context mContext;

    private Model() {
    }

    public static Model getInstance(){
        if (model==null) {
            model = new Model();
        }
        return model;
    }
    //初始化
    public void init(Context context){
        this.mContext = context;
    }

    //获取全局线程池
    public ExecutorService getGlobalThreadPool(){
        return executorService;
    }

}
